package factory;

public class App1 {

    public static void main(String[] args) {

        //1.获取工厂
        Factory1.RiceFactory riceFactory = new Factory1.RiceFactory();

        //2.获取工厂中的产品
        Server1.Food food = riceFactory.getFood();

        //3.实现产品功能
        food.eat();

        //吃面也是如此
        new Factory1.NoodlesFactory().getFood().eat();
    }

}
